package com.aihna.mall.domain.bo;

import com.aihna.common.mybatis.core.domain.BaseEntity;
import com.aihna.mall.domain.StoreUserLevel;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Range;

import java.math.BigDecimal;

@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = StoreUserLevel.class, reverseConvertGenerate = false)
public class UserOperateIntegralMoneyBo extends BaseEntity {

    private Long id;

    @Range(min = 1, max = 2, message = "请选择正确的类型， 【1 = 增加， 2 = 减少】")
    private Integer integralType;

    @Min(value = 0)
    @Max(value = 999999)
    private Integer integralValue;

    @Range(min = 1, max = 2, message = "请选择正确的类型， 【1 = 增加， 2 = 减少】")
    private Integer moneyType;

    @DecimalMin(value = "0.00")
    @DecimalMax(value = "999999.99")
    private BigDecimal moneyValue;
}
